module.exports = {
  /**
   * Application configuration section
   * http://pm2.keymetrics.io/docs/usage/application-declaration/
   */
  apps : [
    {
      name      : 'inewhome_im',
      script    : 'index.js',      
      watch: true,
      ignore_watch:['public','stest','node_modules'],
      env: {
        COMMON_VARIABLE: 'true'
      },
      env_production : {
        NODE_ENV: 'production'
      }
    }
  ],

  /**
   * Deployment section
   * http://pm2.keymetrics.io/docs/usage/deployment/
   * 
   * pm2 deploy production setup
   */
  deploy : {
    dev : {
      user : 'xiejianwei',      
      host : ['112.74.210.253'],
      port:"36000",
      path:'/home/xiejianwei/pm2/pm2test',
      "repo" : "https://gitee.com/bianlitong/socket.git",
      "ref"  : "origin/master",
      "ssh_options": "StrictHostKeyChecking=no",
      "post-deploy" : "npm install && pm2 startOrRestart ecosystem.config.js --env dev",
      env  : {
        NODE_ENV: 'dev'
      }
    }
  }
};
